//点击轮播图切换
var search = document.querySelector(".search_div"),
    search_list = document.querySelector(".search_list"),
    search_submit = document.querySelector(".search_button");
search.addEventListener("focus", function () {
    search_list.style.display = "block";
    search.style.border = "1px solid #ff6700";
    search_submit.style.border = "1px solid #ff6700";
});
search.addEventListener("blur", function () {
    search_list.style.display = "none";
    search.style.border = "1px solid #e0e0e0";
    search_submit.style.border = "1px solid #e0e0e0";
});

//轮播图
var now_index = 5;
var banner = document.querySelector(".banner_img");
var banner_img = document.querySelectorAll(".banner_img li");
function left() {
    banner_img[now_index].style.opacity = "0";
    --now_index;
    if (now_index < 0) {
        now_index = 5;
        for (var i = 0; i < banner_img.length; i++) {
            banner_img[i].style.opacity = "1";
            banner_img[now_index].style.zIndex = "2";
            banner_img[now_index-1].style.zIndex = "0";
        }
    }
    console.log(now_index);
}
setInterval(left, 1000);